package xiao.ke.activemq;


import javax.jms.Queue;
import javax.jms.Topic;


import org.apache.activemq.command.ActiveMQQueue;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;


@SpringBootApplication
@EnableJms
public class ActivemqDemoApplication {

    @Bean
    public Queue queue() {
        return new ActiveMQQueue("common.queue");
    }

    @Bean
    public Topic topic() {
        return new ActiveMQTopic("video.topic");
    }

    public static void main(String[] args) {
        SpringApplication.run(ActivemqDemoApplication.class, args);
    }

}
